-
Notifications
You must be signed in to change notification settings - Fork 60
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix: make AT128 scans align with scan_phase #84
Conversation
Plot angle timings rel to ToS
54cb3b7
to
e715687
Compare
Codecov ReportAttention:
❗ Your organization needs to install the Codecov GitHub app to enable full functionality. Additional details and impacted files@@ Coverage Diff @@
## main #84 +/- ##
=========================================
+ Coverage 8.28% 13.83% +5.54%
=========================================
Files 87 45 -42
Lines 8456 4526 -3930
Branches 852 799 -53
=========================================
- Hits 701 626 -75
+ Misses 7180 3346 -3834
+ Partials 575 554 -21
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
@mojomex |
* Scans are always cut at the start of a mirror now * Scan phase is sent as-is (in output coordinates) to the sensor, since it handles the conversion internally now.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great stuff, and ready to merge - but do you mind removing 14b43c0c0e9b69fc941e422a246e1169017fff73 to make merging as simple as possible?
14b43c0
to
a0b14d4
Compare
Done 👍 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🥳
PR Type
Related Links
TIER IV INTERNAL LINK -- AT128
scan_angle
troubleshooting logDescription
Before this PR, AT128's pointcloud timestamps were not aligned to top of second at the set
scan_angle
.The refactoring in #42 introduced a wrong calculation for scan cutting in AT128 (subtracted
scan_angle
in output coordinates from the raw azimuth value).Further, AT128's 3.50.6 software version set
scan_angle
as-is, without converting internally to encoder angles first.This has been fixed in 3.50.8.
This PR fixes this issue via the following code changes:
scan_angle
in the respectiveangle_corrector_...
implementations, not inhesai_decoder
scan_phase
parameter in the AT128 configuration file to30.0
(the lowest legal value)Review Procedure
Run Nebula with AT128, set
scan_angle
to different values30 <= scan_angle <= 150
and observe the timestamps of the output pointclouds:ros2 topic echo --field header.stamp.nanosec /pandar_points
If the second and third digits are always close to
0
, the fix is working.Remarks
Because channel corrections can range from around -3 to +3 deg for the same encoder angle, there is a range of output angles associated with the encoder angle. Currently, the scan cutting/angle conversion code ignores this. It is a design decision whether to align to the earliest channel to hit
scan_angle
or to align channel-agnostically (without factoring in correction). The latter ends up roughly in the mean of all channels.Here is an excerpt from the extensive analysis, showing
![image](https://private-user-images.githubusercontent.com/6088931/279644558-299fc8da-c5d5-49c3-9109-f5a7c19397b2.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MzkwMTk0NDksIm5iZiI6MTczOTAxOTE0OSwicGF0aCI6Ii82MDg4OTMxLzI3OTY0NDU1OC0yOTlmYzhkYS1jNWQ1LTQ5YzMtOTEwOS1mNWE3YzE5Mzk3YjIucG5nP1gtQW16LUFsZ29yaXRobT1BV1M0LUhNQUMtU0hBMjU2JlgtQW16LUNyZWRlbnRpYWw9QUtJQVZDT0RZTFNBNTNQUUs0WkElMkYyMDI1MDIwOCUyRnVzLWVhc3QtMSUyRnMzJTJGYXdzNF9yZXF1ZXN0JlgtQW16LURhdGU9MjAyNTAyMDhUMTI1MjI5WiZYLUFtei1FeHBpcmVzPTMwMCZYLUFtei1TaWduYXR1cmU9YTI3YjIwMzJmMjc0MTZiMjJkYTU1ZWQ1ZDhjMDBkYTg2NDA2Mzk4ZmFkNjQwZTgwMTFlZmZhYWE1YjhjNmM2ZCZYLUFtei1TaWduZWRIZWFkZXJzPWhvc3QifQ.dfLIM5avxebfO7gFjSBEhwz4EReEjKVoRYVzG2oC1WE)
scan_angle = 90 deg
. Black is aligned to0.X000... s
, yellow is maximally unaligned (0.Y999... s
). Channel 0 is the innermost ring, channel 127 the outermost. One can see that the points at the same output angle are not all aligned to ToS.Pre-Review Checklist for the PR Author
PR Author should check the checkboxes below when creating the PR.
Checklist for the PR Reviewer
Reviewers should check the checkboxes below before approval.
Post-Review Checklist for the PR Author
PR Author should check the checkboxes below before merging.
CI Checks